package com.example.culture.util;

import java.io.*;
import java.util.Properties;

public class PropertiesUtils {

    static Properties  properties=new Properties();
    static InputStream in = PropertiesUtils.class.getResourceAsStream("/path.properties");
    public static String getProperties(){

        try {
            properties.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties.getProperty("path");
    }

    public static String getNetProperties(){
        try {
            properties.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties.getProperty("netPath");
    }
    public static String getFmProperties()  {
        try {
            properties.load(new InputStreamReader(in, "utf-8"));
            properties.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        String fmPath= null ;
        try {
            fmPath = new String(properties.getProperty("fmPath").getBytes("ISO-8859-1"),"gbk");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return fmPath;
    }
}
